(experimental WIP) Rack 3.x support#325
Draft
chadlwilson wants to merge 8 commits intojruby:masterfrom
Draft
Conversation
5da0514 to
9b01b6a
Compare
kares
reviewed
Sep 2, 2025
Member
kares
left a comment
There was a problem hiding this comment.
nice attempt to support both versions, seems maintainable...
| @runtime = @rack_factory.getApplication.getRuntime | ||
| should_eval_as_not_nil "defined?(Rack.release)" | ||
| should_eval_as_eql_to "Rack.release.to_s[0, 3]", '2.2' | ||
| should_eval_as_eql_to "%w(2.2 3.1 3.2).include? Rack.release.to_s[0, 3]", true |
Member
There was a problem hiding this comment.
IMHO isn't a good test this way, we should maybe duplicate these per each Rails/Rack version tested.
Member
There was a problem hiding this comment.
I see now that there's "rails80" => %w[rack22 rack31 rack32] so in that sense I guess this is fine...
Contributor
Author
There was a problem hiding this comment.
Yeah it's not good, but I couldn't think of a way to pass in the expected version cleanly without checking loaded gems which is kind of circular....
| # @param params the Hash to store the name, value pair | ||
| def store_parameter2(params, key, val, depth = 0) | ||
| # emulating Rack::Utils.parse_nested_query behavior | ||
| raise ::Rack::Utils::ParamsTooDeepError if depth >= 32 |
Member
There was a problem hiding this comment.
isn't the depth configurable in Rack itself?
Contributor
Author
There was a problem hiding this comment.
It seems just a hard coded security thing :(
52944a0 to
c4cd00e
Compare
6279ba8 to
c5a7a6e
Compare
0b70f23 to
196095b
Compare
196095b to
a8f9f1a
Compare
5f1d489 to
b63259a
Compare
chadlwilson
commented
Oct 27, 2025
b63259a to
c622ca7
Compare
c622ca7 to
1a8458b
Compare
…with our original alg
1a8458b to
b464158
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Highly WIP/experimental right now as currently involves a rewrite/re-"port-from-rack" of the parameter parsing algorithm, and needs further discussion since this library diverges from Rack in some respects already, and we'll need to decide whether we will persist with these in v3 operation.
https://github.com/rack/rack/blob/main/UPGRADE-GUIDE.md
Will also summarise the open discussion points at some point.
Open questions/discussion point
rack-sessionalso?rackup? Or rely on Rails/frameworks to bring them in?HeaderHashwrapper for error app has any effect on Rack 2.2#callsupport is needed